﻿<%@ Page Title="" Language="C#" MasterPageFile="Template2.Master" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="EnglishAuction.Search" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    Tìm kiếm nâng cao
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script>
        function getStyle() {
            var temp = document.getElementById("sidebar").style.visibility;
            return temp;
        }

        function ShowDiv() {
            var current = getStyle();
            if (current == "visible") {
                document.getElementById("sidebar").style.visibility = "hidden";
            }
            else {
                document.getElementById("sidebar").style.visibility = "visible";
            }
        }
    </script>
    <form runat="server">
        <div id="sidebar" style="visibility: visible; padding: 10px;">
            <div class="tieuchi">
                <p><span class="bold">Giá sản phẩm</span></p>
                <table>
                    <tr>
                        <td>Từ:</td>
                        <td>
                            <asp:TextBox ID="txtFromPrice" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>Đến:</td>
                        <td>
                            <asp:TextBox ID="txtToPrice" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                </table>

                <%--                <asp:Button CssClass="searchbtn" ID="Button2" runat="server" Text="Submit" OnClick="Button2_Click" Enabled="False" />--%>
                <br />
            </div>
            <hr style="border-style: dashed;" />
 
            <div class="tieuchi">
                <p><span class="bold">Ngày lên sàn</span></p>
                <table>
                    <tr>
                        <td>
                            <span class="input-control checkbox">
                                <asp:CheckBox ID="cbToday" runat="server" />
                                <%--                                <asp:RadioButton ID="cbToday" runat="server"/>--%>
                                <span class="helper">Hôm nay</span>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <span class="input-control checkbox">
                                <asp:CheckBox ID="cbThisMonth" runat="server" />
                                <%--<asp:RadioButton ID="cbThisMonth" runat="server"/>--%>
                                <span class="helper">Tháng nay</span>
                            </span>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <%--end #sidebar--%>

        <div id="wrap-search">
            <div id="search-bar">

                <asp:TextBox CssClass="keywordtxt" ID="txtKeyword" runat="server" Text="Search Here" onfocus="if(this.value == 'Search Here') this.value = '';"
                    onblur="if(this.value == '') this.value = 'Search Here'" ForeColor="Gray"></asp:TextBox>
                <asp:DropDownList ID="ddlLoaiSanPham" runat="server" CssClass="selection" OnSelectedIndexChanged="ddlLoaiSanPham_SelectedIndexChanged"></asp:DropDownList>
                <asp:Button CssClass="button" ID="btnSearch" runat="server" Text="Tìm kiếm" OnClick="btnSearch_Click" />
                <asp:Button CssClass="button" ID="btnAdvanced" runat="server" Text="Nâng cao" OnClientClick="ShowDiv(); return false;" />


            </div>
            <%-- end #search bar   --%>

            <div id="search-content">
                <asp:Label ID="lbError" runat="server" Text="" ForeColor="red" Font-Size="X-Large" Font-Bold="true"></asp:Label>
                <p>
                    Kết quả trả về là:
                    <asp:Label ID="lbCountSP" CssClass="bold" runat="server" Text="0"></asp:Label>
                    &nbsp;sản phẩm
                </p>
                <hr />
                <asp:DataList ID="dlSanPham" runat="server" RepeatDirection="Horizontal" RepeatColumns="3" ShowFooter="False" ShowHeader="False" Width="100%" Style="margin: 0 auto;" CellPadding="5" CellSpacing="2">
                    <ItemTemplate>
                        <div style="width: 350px; background: #fff; border: solid 1px #ccc; height: 140px;">
                            <div style="float: left; width: 140px;">
                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "DetailsProduct.aspx?Id="+Eval("Id") %>'>
                                    <asp:Image ID="Image1" Width="120px" Height="120px" ImageUrl='<%# "~/images/"+Eval("HinhAnh") %>' runat="server" ImageAlign="AbsMiddle" Style="margin: 10px; border: solid 1px #ccc;" />
                                </asp:HyperLink>
                            </div>
                            <div>
                                <div style="padding-top: 10px;">
                                    <div style="color: #0072BC; font-weight: bold; font-size: 15px;">
                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("TenSanPham") %>'></asp:Label>
                                    </div>
                                    <div style="margin-top: 8px;">
                                        Giá sàn:
                                        <asp:Label ID="Label2" runat="server" Style="font-weight: bold;" Text='<%# Eval("GiaSan", "{0:###,###}")+" (VNÐ)" %>'></asp:Label>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </div>
            <%-- end content1--%>
            <%--<asp:HyperLink ID="HyperLink1" runat="server" ImageUrl='<%# "images/"+Eval("HinhAnh") %>' NavigateUrl='<%# "DetailsProduct.aspx?Id="+Eval("Id") %>' Height="200px" Width="200px">HyperLink</asp:HyperLink>--%>
        </div>
        <%--end wrapper--%>
    </form>

</asp:Content>

